<template>
    <div class="page-error">
        <p>{{ message }}</p>
    </div>
</template>

<script>
export default {
    name: 'error',
    computed: {
        message() {
            return this.$route.params.error || '您访问的路径不存在';
        }
    },
    mounted() {
        this.$router.replace({
            name: 'index'
        });
    }
};
</script>

<style lang="stylus" scoped>
.page-error {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
</style>
